package com.snopy.fallback;

import com.snopy.service.MiddleItemService;
import com.snopy.item.pojo.Items;
import com.snopy.item.pojo.ItemsImg;
import com.snopy.item.pojo.ItemsParam;
import com.snopy.item.pojo.ItemsSpec;
import com.snopy.item.pojo.vo.CommentLevelCountsVO;
import com.snopy.item.pojo.vo.ShopcartVO;
import com.snopy.pojo.PagedGridResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author snopy
 * @version 1.0.0
 * @classname AlternativeOption
 * @description
 * @email 77912204@qq.com
 * @date 2022/03/13 20:15
 */
@Slf4j
@Component
public class Fallback implements MiddleItemService {


    /**
     * 根据商品ID查询详情
     *
     * @param itemId
     * @return
     */
    @Override
    public Items queryItemById(@RequestParam("itemId") String itemId) {
        return null;
    }

    /**
     * 根据商品id查询商品图片列表
     *
     * @param itemId
     * @return
     */
    @Override
    public List<ItemsImg> queryItemImgList(@RequestParam("itemId")String itemId) {
        return null;
    }

    /**
     * 根据商品id查询商品规格
     *
     * @param itemId
     * @return
     */
    @Override
    public List<ItemsSpec> queryItemSpecList(@RequestParam("itemId")String itemId) {
        return null;
    }

    /**
     * 根据商品id查询商品参数
     *
     * @param itemId
     * @return
     */
    @Override
    public ItemsParam queryItemParam(@RequestParam("itemId")String itemId) {
        return null;
    }

    /**
     * 根据商品id查询商品的评价等级数量
     *
     * @param itemId
     * @return
     */
    @Override
    public CommentLevelCountsVO queryCommentCounts(@RequestParam("itemId")String itemId) {
        return null;
    }

    /**
     * 根据商品id查询商品的评价（分页）
     *
     * @param itemId
     * @param level
     * @param page
     * @param pageSize
     * @return
     */
    @Override
    public PagedGridResult queryPagedComments(@RequestParam("itemId")String itemId,
                                              @RequestParam("level") Integer level,
                                              @RequestParam(value = "page",required = false) Integer page,
                                              @RequestParam(value = "pageSize",required = false) Integer pageSize) {
        return null;
    }

    /**
     * 根据规格ids查询最新的购物车中商品数据（用于刷新渲染购物车中的商品数据）
     *
     * @param specIds
     * @return
     */
    @Override
    public List<ShopcartVO> queryItemsBySpecIds(@RequestParam("specIds") String specIds) {
        return null;
    }

    @Override
    public ItemsSpec queryItemSpecById(@RequestParam("specId")String specId) {
        return null;
    }

    /**
     * @param itemId
     * @Description
     * @param: itemId
     * @return: java.lang.String
     * @Date 2022-03-09
     * @Author txl77912204@gmail.com
     */
    @Override
    public String queryItemMainImgById(@RequestParam("itemId") String itemId) {
        return null;
    }

    /**
     * 减少库存
     *
     * @param specId
     * @param buyCounts
     */
    @Override
    public void decreaseItemSpecStock(@RequestParam("specId") String specId,
                                      @RequestParam("buyCounts") int buyCounts) {

    }

    @Override
    public String errorTest() {
        log.info("just a test!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        return "Here is Alternative Option class,which is define how to deal with the exception!";
    }
}
